\documentclass[titlepage]{article}

\usepackage{tabularx}
\usepackage{fullpage}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage[pdfborder={0 0 0}]{hyperref}

\graphicspath{{./uml/}{./UImockup/}{./useCaseDiagrams/}{./sequenceDiagrams/}}

\heavyrulewidth=.1em

\newcommand{\actor}[1]{\texttt{#1}}

\newcommand{\ucMinipage}{\begin{minipage}[t]{0.76\textwidth}}

\newcommand{\scMinipage}{\begin{minipage}[t]{0.76\textwidth}}

\newcommand{\ucStart}{
\begin{table}[htbp]
	\begin{tabular}{p{0.19\textwidth} l}
		\toprule}

\newcommand{\ucName}[1]{
		\emph{Use case name}&
		\ucMinipage
			\begin{description} \parskip0pt \itemsep1pt
				\item\hspace{2em}\texttt{#1}
			\end{description}
		\end{minipage}\\}

\newcommand{\ucDescription}[1]{
		\midrule
		\emph{Description}&
		\ucMinipage
			\begin{description} \parskip0pt \itemsep1pt
				\item\hspace{2em}\textnormal{#1}
			\end{description}
		\end{minipage}\\}

\newcommand{\ucStartActor}{
		\midrule
		\emph{Participating actors}&
		\ucMinipage
			\begin{description} \parskip0pt \itemsep1pt}

\newcommand{\ucActor}[1]{
				\item\hspace{2em}\texttt{#1}}

\newcommand{\ucEndActor}{
			\end{description}
		\end{minipage}\\}

\newcommand{\ucStartFlow}{
		\midrule
		\emph{Flow of events}&
		\scMinipage
			\begin{enumerate} \parskip0pt \itemsep1pt}

\newcommand{\ucFlow}[1]{
				\item #1}

\newcommand{\ucEndFlow}{
			\end{enumerate}
		\end{minipage}\\}

\newcommand{\ucStartEntry}{
		\midrule
		\emph{Entry condition} &
		\scMinipage
			\begin{itemize} \parskip0pt \itemsep1pt}

\newcommand{\ucEntry}[1]{
				\item #1}

\newcommand{\ucEndEntry}{
			\end{itemize}
		\end{minipage}\\}

\newcommand{\ucStartExit}{
		\midrule
		\emph{Exit condition}&
		\scMinipage
			\begin{itemize} \parskip0pt \itemsep1pt}

\newcommand{\ucExit}[1]{
				\item #1}

\newcommand{\ucEndExit}{
			\end{itemize}
		\end{minipage}\\}

\newcommand{\ucStartQuality}{
		\midrule
		\emph{Quality \mbox{requirements}}&
		\scMinipage
			\begin{itemize} \parskip0pt \itemsep1pt}

\newcommand{\ucQuality}[1]{
				\item #1}

\newcommand{\ucEndQuality}{
			\end{itemize}
		\end{minipage}\\}

\newcommand{\ucEnd}{
		\bottomrule
	\end{tabular}
\end{table}}

\newcommand{\scStart}{
\begin{table}[htbp]
\begin{tabular}{p{0.19\textwidth} l}
\toprule}

\newcommand{\scName}[1]{
\emph{Scenario name}&
\scMinipage
\begin{description}
\item\hspace{2em}\texttt{\underline{#1}}
\end{description}
\end{minipage}
\\}

\newcommand{\scStartActor}{
\midrule
\emph{Participating actor instances}&
\scMinipage
\begin{description}
\parskip0pt
\itemsep1pt }

\newcommand{\scEndActor}{
\end{description}
\end{minipage}
\\}

\newcommand{\scActor}[1]{
\item\hspace{2em}\texttt{\underline{#1}}}

\newcommand{\scStartFlow}{
\midrule
\emph{Flow of events}&
\scMinipage
\begin{enumerate}
\parskip0pt
\itemsep1pt}

\newcommand{\scEndFlow}{
\end{enumerate}
\end{minipage}
\\}

\newcommand{\scFlow}[1]{
\item #1}

\newcommand{\scEnd}{
\bottomrule
\end{tabular}
\end{table}}

\title{Requirements Analysis Document\\Colony Management\\(Working Title)}
\author{CIS*3760 Software Engineering\\
\\
Winter 2012\\
\\
School of Computer Science\\
University of Guelph\\
Guelph, ON, Canada\\
%%\vfill
\\
Team members:\\
Chris Allen, 0703391\\
Douglas Griffith, 0506355\\
Jameson Reed, 0666220\\
\\
Clients:\\
Jeremy Simpson, Ph.D.\\
Melissa Allwood, BSc.H
}

\date{}

\begin{document}
\maketitle
\tableofcontents
\clearpage

\section{Revision History}
\subsection*{Revision 1.0}

Initial release, 2012-02-13

\subsection*{Revision 1.1}

Second release, 2012-03-02\\

\noindent Implemented suggested fixes:
\begin{itemize}
	\item Functional requirements in bullet points
	\item Changed state machine diagrams to use UML standard `stop' symbols
	\item Removed inheritance from boundary class diagram to improve clarity
\end{itemize}

\subsection*{Revision 1.2}

Third release, 2012-03-12\\

\noindent Minor fixes.

\subsection*{Revision 1.3}

Fourth release, 2012-03-26\\

\noindent Minor updates.

\clearpage

%\begin{tabularx}{\textwidth}{| l | l | X |}
%\hline
%\textbf{Revision} & \textbf{Date} & \textbf{Comments} \\
%\hline
%Revision 1.0 & 2012-02-13 & Initial release \\
%\hline
%\end{tabularx}
%\clearpage

\section{Preface}

This document addresses the requirements of Colony Management, as obtained through discussion with the Client.

\section{Target audience}

Client, Developers.

\section{Introduction}

Fees associated with animal care and housing are among the highest expenditures in research.
Depending on the number and size of each animal colony, costs can range from \$20,000 to \$100,000 per year.

Senior researchers usually depend on graduate students looking after the breeding and management of colonies.
A research lab will have multiple colonies being used by multiple graduate students.
Animal breeding colonies require daily monitoring as the size of the colony can grow faster than expected, and young scientists are still learning how to plan weeks and months in advance for experiments that depend on the correct number and genotype of animals.
Thus, appropriate management of animal colonies is of critical importance to prevent excess litters and optimize use for experiments, as well as minimize costs.

Several applications are currently available, designed for the management of numerous animal colonies, however, these programs are intended for large-scale projects and breeding facilities.
Furthermore, as they are designed for large facilities, they are extremely complex and not user-friendly.
Surprisingly, there are virtually no programs available to track animal colonies of moderate size and aimed directly at helping undergraduate and graduate students plan animal usage, experiments and breeding.

Considering the sheer volume of research labs actively taking part in animals research, a user-friendly program allowing for simple and accurate tracking of modestly sized colonies would be of considerable interest to many researchers at Guelph and across North America.
Moreover, by implementing a standard software to track colonies, animal care fees and animal use could be minimized allowing for more humane and cost-effective research to be performed.

\section{Current system}

As of now, researchers are using spreadsheets and written notes to monitor the colonies.
The specification of the system is not formally defined, and differs between individuals working on the same colony.
Updating a system you have become accustomed to and personalized becomes faster over time, but it is difficult to synchronize changes between researchers because of personal customization.
Obtaining an overview of how the operation as a whole is performing is also difficult, requiring a supervisor to ask each researcher individually.

\section{Proposed system}

\subsection{Overview}

The application is a mobile, stand-alone, colony management application designed for BlackBerry and iPhone devices.
Its purpose is to provide researchers with tracking and managing tools to oversee various mice colonies and their associated experiments.
The application also monitors the prerequisites of each experiment and provides calendar dates to show the researcher when experiments can be performed.
The information gathered by the application can be synchronized with fellow researchers by creating research mailing groups within the application.

\subsection{Functional requirements}

\begin{itemize}
\item This project has one user class, a researcher, who requires these specific functional requirements in order to make use of the application.
\item Researchers must be able to create experiment colonies, specifying attributes that mice of each colony should posses.
\item Researchers must be able to add mice to colonies and specify their age, genotypes, gender, and tag number.
\item Researchers must be able to edit mice after they are created.
\item Researchers should be able to create breeding pairs, which is a set of one male and one female mouse which are bred to create litters.
\item Researchers should be able to record the parentage of mice within a litter.
\item Researchers must be able to keep track of the size of litters produced by breeding pairs.
\item Researchers must also be able to create experiments within each colony.
\item Experiments must have specific guidelines regarding what mice are valid for the test.
\item Experiments must support these attributes: the number of colony members required, which genotypes and genders are required, and finally specify the age range of mice that can be considered for testing.
\item Experiments must be able to be ranked, to prioritize which experiments should be assigned appropriate mice first from the pool of available candidates.
\item Researchers should be provided with calendar events to let them know when an experiment is ready to start.
\item Researchers must be able to share their colony information.
\item Researchers must be able to export to a spreadsheet compatible format.
\item Researchers must also be able to import and export information from other team members.
\end{itemize}

\subsection{Non-functional requirements}
\subsubsection{User interface}

As the application will be used on a mobile device the interface should be designed to ensure that it is usable with a touch interface that does not require too much precision and can be used with one hand or finger.
Furthermore information should be presented in a manner that maximizes the use of the limited screen space.
Lastly the user interface should be intuitive and require minimal training.

\subsubsection{Documentation}

The application should be intuitive for the researcher so long as they are familiar with the researcher interface conventions of their platform, and the terminology related to animal research.
External documentation will be provided along with the software, as well as in-application documentation.
A new user should be able to start using the application with the documentation without supervised training.

\subsubsection{Hardware consideration}

The target platform will be Apple non-tablet mobile devices with iOS version 4 or greater, and BlackBerry non-tablet mobile devices with BBOS version 5 or greater. The application should accommodate for the limited processing power in mobile devices.

\subsubsection{Performance characteristics}

The application is designed to be a tool to speed up the researcher's data management and animal tracking activities, as such  all commonly repeated tasks should complete without noticeable delay. The exception to this are the tasks that would typically be performed the end of a work period such as performing a data transfer, or family tree export which are not as time sensitive.

\subsubsection{Error handling and extreme conditions}

In order to safeguard against errors the researcher needs to be able to modify and correct any data stored by the application. The application also must be able to continue to function correctly after an unexpected crash or termination with minimal data loss.

\subsubsection{System interfacing}

The application should be able to interface with the mobile device's email and calender functionality. Furthermore, the application should be registered within the mobile device's operating system as a target application to be used to open the application's import file format.

\subsubsection{Quality issues}

The key quality focuses for the application are ease of use, efficiency, and reliability. The system should never create excess work for the researcher, and it should never interfere with the researchers ability to finish their work. Furthermore, the researcher should never feel overwhelmed by the application's complexity. Lastly, the researcher should never have difficulty accessing data they have stored in the system. 

\subsubsection{System modifications}

The application should allow for considerable modification and improvement in the future, an example being extending functionality for a larger spectrum of colony and experiment types, with different animals and custom attributes.

\subsubsection{Physical environment}

As the application will be used on a mobile device in a research lab environment, it must be convenient for the researcher to use while performing other tasks and should be feasible to use with one hand or finger.

\subsubsection{Security issues}

Data security is not a focus for this application, researchers  should be free to change their local data so long as they have access to the phone its on. Furthermore an importing researcher will be able to specify that they intend to override there data with the incoming copy without any form of credentials.

\subsubsection{Resource issues}

No data maintained by the application should ever be at risk of being lost, the application should be able to produce a backup. Furthermore, the application should be able to handle the extreme case of the data becoming too large to be practically kept on the phone and be able to export the unused data to a secondary source while maintaining in use data. 

\subsection{Constraints}

Because the application is cross platform for both the iPhone and BlackBerry, it will be developed in HTML, JavaScript, and CSS and then compiled and deployed to each device using PhoneGap.

The devices supported will be BlackBerry non-tablet mobile devices that support BBOS version 5 or greater, and Apple non-tablet mobile devices that support iOS version 4 or greater.

\clearpage
\subsection{System model}

\subsubsection{Scenarios}

\scStart
	\scName{bobCreatesColony}

	\scStartActor
		\scActor{Bob:Researcher}
		\scActor{Storage:LocalStorage}
	\scEndActor

	\scStartFlow
		\scFlow{Bob opens the app for the first time and as he has no colonies present he starts the colony creation process.}
		\scFlow{Bob enters that he wants the colony to be named `Alpha', he is working with mice of the genotypes: Knockout, Wildtype. Lastly he specifies that he would like to have the researcher to input the gender of the mice.}
		\scFlow{Bob submits his new colony. The information he entered is stored by Storage, and Bob is returned a view of his colonies.}
		\scFlow{Bob sees colony Alpha that he just created and checks the status of the colony, finding all of its details to be just as he entered them.}
	\scEndFlow
\scEnd

\scStart
	\scName{litterBorn}

	\scStartActor
		\scActor{Bob:Researcher}
		\scActor{Storage:Local Storage}
	\scEndActor

	\scStartFlow
		\scFlow{When Bob visits his colony Alpha he notices that a litter has been born.}
		\scFlow{Bob opens up the application and navigates to colony Alpha and checks his list of litters and then selects the add option. }
		\scFlow{Bob counts the number of mice in the litter and notes the breeding pair that had the litter, then in the application he quickly selects the breeding pair from the list of active breeding pairs and enters the number of pups in the litter, he does not have to change the date of birth as it is already set to the current date.}
		\scFlow{Bob checks over his entries and then selects the submit option.}
		\scFlow{Storage records the new pups making sure that they retain there relation to their breeding pair, and marking them for needing tags, gender info, and genotypes.}
		\scFlow{Bob is returned to the a list of his litters where he notices that the litter he just entered is flagged indicating that there are pups waiting for their information.}
	\scEndFlow
\scEnd

\scStart
	\scName{readyingPups}

	\scStartActor
		\scActor{Bob:Researcher}
		\scActor{Storage:Local Storage}
	\scEndActor

	\scStartFlow
		\scFlow{When Bob enters the research lab he checks on a litter of pups and decides that they are ready to be tagged and have samples sent to the test lab to determine genotypes.}
		\scFlow{While setting up his work space Bob loads up the application, navigates to the list of his litters.}
		\scFlow{Bob selects the litter he would like to work with by their data of birth.}
		\scFlow{As Bob selects the first mouse of the litter and tags its ear, he tells the application he is adding information for one of the unidentified mice.}
		\scFlow{The count of unidentified mice in the system decreases and a new mouse is created with entry fields waiting for gender and genotype and tag. He he enters the tag number into the tag field.}
		\scFlow{Bob decides the mouse is male and enters such in the gender field, but leaves the genotype field empty.}
		\scFlow{Bob moves onto a second mice repeating the actions he performed in step 4. However this time he is having difficulty determining the gender of the mouse and as such leaves both fields blank. }
		\scFlow{Bob repeats the preceding actions until he is finished with all the mice in the litter, and then saves his work.}
		\scFlow{Storage adds the tagged mice to the mice list and flags them as needing data and not yet ready to be added to experiments.}
		\scFlow{When bob is returned to a list of his litters he sees the litter he just edited is still available as a selection as there is still data to be entered for it. }
	\scEndFlow
\scEnd

\scStart
	\scName{bobCreatesAnExperiment}

	\scStartActor
		\scActor{Bob:Researcher}
		\scActor{Storage:Local Storage}
	\scEndActor

	\scStartFlow
		\scFlow{Bob has finished planning out an experiment he wants to perform with some of the mice in his colony and he wants to add its requirements to the application so that it can help him identify mice available to use for it.}
		\scFlow{Bob launches the application and navigates into his colony's experiments, he chooses to create and experiment.}
		\scFlow{Bob enters the name of the experiment "BobsBrilliantTest" sets priority to High and then chooses to add a control group.}
		\scFlow{For the first control group bob enters 5 Male mice at age 10-12 weeks with the Knockout Genotype he then submits the control group definition.}
		\scFlow{Returning to editing "BobsBrilliantTest" bob sees the control group he just entered. }
		\scFlow{Bob enters a few more control groups, and then chooses to add some durations to the experiment to be used when its time to start performing the experiment.}
		\scFlow{Bob adds 3 durations immediate, 1 week, and 4 weeks and then submits the durations creation.}
		\scFlow{Back at the experiment creation Bob checks over the experiment he has created so far. Satisfied that all his requirements have been entered Bob submits the experiment. }
		\scFlow{Storage records the experiment and all its control groups, and related durations, and priority.}
		\scFlow{Bob is returned to the experiment where he can see that some mice have already been designated to his experiment as it has been flagged as having mice allotted but still needing more. }
	\scEndFlow
\scEnd

\scStart
	\scName{FredJoinsTheTeam}

	\scStartActor
		\scActor{Bob:Researcher}
		\scActor{Fred:Researcher}
		\scActor{Storage:Local Storage}
		\scActor{iOS:Operating System}
	\scEndActor

	\scStartFlow
		\scFlow{Bob has accepted Fred as a member of the team and now the two of them need to make sure there colony data is in sync with one another. Bob has had Fred install the application on his phone and needs to transfer the data for colony Alpha to Fred.}
		\scFlow{Bob opens the application and navigates to colony Alpha and selects the data transfer option }
		\scFlow{Bob adds Fred's email to the team list and then chooses to email a colony export. }
		\scFlow{The system accesses Storage and creates an export of all the data for colony Alpha.}
		\scFlow{IOS is asked to perform an email and is given the export to attach to the email}
		\scFlow{Bob confirms sending the email to Fred.}
		\scFlow{Fred opens the email from bob and selects the attached export file, choosing open on download.}
		\scFlow{When the file finishes downloading IOS chooses the application to open the file. }
		\scFlow{The application quickly confirms with Fred that he wishes to overwrite any existing information for colony Alpha, Fred confirms.}
		\scFlow{The data for colony Alpha is imported and Fred can see it in his list of Colonies.}
	\scEndFlow
\scEnd

\clearpage
\subsubsection{Use case models}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{colonyUCD}
\caption{Colonies use case diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{systemStateUCD}
\caption{System state use case diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{mouseUCD}
\caption{Mouse use case diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{experimentUCD}
\caption{Experiment use case diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{breedingPairsUCD}
\caption{Breeding pairs use case diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{litterUCD}
\caption{Litter use case diagram}
\end{figure}
\clearpage

%\ucStart
%	\ucName{test}
%
%	\ucStartActor
%		\ucActor{testzor}
%	\ucEndActor
%
%	\ucStartFlow
%		\ucFlow{test 1}
%		\ucFlow{test 2}
%	\ucEndFlow
%
%	\ucStartEntry
%		\ucEntry{arstarst}
%	\ucEndEntry
%
%	\ucStartExit
%		\ucExit{testarst}
%	\ucEndExit
%
%	\ucStartQuality
%		\ucQuality{testzor}
%	\ucEndQuality
%\ucEnd

\ucStart 
	\ucName{viewBreedingPairs}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view a list breeding pairs from a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the list of associated breeding pairs}
		\ucFlow{The application returns all active breeding pairs within a colony}
	\ucEndFlow 
	\ucStartExit
		\item \actor{Researcher} sees all breeding pairs associated to the colony selected, OR
		\item The application informs the researcher that there are no breeding pairs associated with the colony
	\ucEndExit 
	\ucStartQuality
		\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{viewBreedingPair}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view a set of breeding pairs from a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
%From Colony view:
		\ucFlow{\actor{Researcher} clicks on the list of associated breeding pairs}
		\ucFlow{The application returns the active breading pairs}
		\ucFlow{\actor{Researcher} clicks one of the pairs}
		\ucFlow{The application returns the details of the pair }
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} can now see the details and options of the breeding pair selected
	\ucEndExit
	\ucStartQuality 
		\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{addBreedingPair}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to add a breeding pair into a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the list of breeding pairs}
		\ucFlow{The application returns the active breading pairs}
		\ucFlow{\actor{Researcher} clicks on the add breeding pair button}
		\ucFlow{The application returns an empty breeding pair form }
		\ucFlow{\actor{Researcher} must select a father mouse}
		\ucFlow{\actor{Researcher} must select a mother mouse}
		\ucFlow{The application saves the changes made}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the list of breeding pairs, OR
\item \actor{Researcher} exits the editing screen without saving
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{editBreedingPair}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to edit a breeding pair in the selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected breeding pair}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks the edit button for the breeding pair }
		\ucFlow{The application returns an edit form of the breeding pair}
		\ucFlow{\actor{Researcher} edits the information in the form and saves their changes }
		\ucFlow{The application saves the changes made}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the breeding pair's details, OR
\item \actor{Researcher} exits the editing screen without saving
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{disableBreedingPair}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to disable a breeding pair in the selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected breeding pair}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks the edit button for the breeding pair}
		\ucFlow{The application returns an edit form of the breeding pair}
		\ucFlow{\actor{Researcher} selects the disable button and confirms the selection}
		\ucFlow{The application disables the pair}
	\ucEndFlow 
	\ucStartExit
\item The application removes the pair from the active breeding pairs list, OR
\item \actor{Researcher} exits the editing screen without saving
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{viewLitters}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view a list litters produced by a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the list of litters}
		\ucFlow{The application returns the litters associated to the colony}
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} sees the litters associated to the colony selected, OR
\item The application informs the researcher that there are no litters associated with the colony
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd
\ucStart 
	\ucName{viewLitter}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view a litter from a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
%From Colony view: 
		\ucFlow{\actor{Researcher} clicks on the list of litters}
		\ucFlow{The application returns the list of litters}
		\ucFlow{\actor{Researcher} clicks one of the litters}
		\ucFlow{The application returns the details of the litter }
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} can now see the details and configure of the litter selected
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{addLitter}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to add a litter into a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the list of litters}
		\ucFlow{The application returns the litters associated to the colony}
		\ucFlow{\actor{Researcher} clicks on the add litter pair button}
		\ucFlow{The application returns an empty litter form }
		\ucFlow{\actor{Researcher} must select an existing BreedingPair to associate with the litter, or the `Unknown' BreedingPair}
		\ucFlow{\actor{Researcher} must enter the litter DOB}
		\ucFlow{\actor{Researcher} must enter the litter size}
		\ucFlow{\actor{Researcher} may enter a custom wean duration}
		\ucFlow{The application saves the litter}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the list of litters, OR
\item \actor{Researcher} exits the edit form without saving
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{editLitter}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to edit a litter in the selected colony}
	\ucStartEntry 
		\ucEntry{ \actor{Researcher} is viewing a selected litter}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the edit button}
		\ucFlow{The application returns an edit form of the litter}
		\ucFlow{\actor{Researcher} edits the information in the form and saves the pair }
		\ucFlow{The application saves the changes made}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the litter details, OR
\item \actor{Researcher} exits while editing in the litter form, OR
\item If all mice are assigned with the required traits and removed from the litter, the litter itself is removed automatically
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{viewMice}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view a list mice from a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects a colony}
		\ucFlow{The application returns options for the selected colony }
		\ucFlow{\actor{Researcher} clicks on the list of mice}
		\ucFlow{The application returns the mice associated to the colony}
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} sees the mice associated to the colony selected, OR
\item The application informs the researcher that there are no mice associated with the colony
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{viewMouse}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view a single mouse from a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the list of mice}
		\ucFlow{The application returns the list of mice}
		\ucFlow{\actor{Researcher} clicks on one of the mice}
		\ucFlow{The application returns the details and options of the mouse }
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} can now see the details of the mouse selected, OR
\item The The application allows options to configure the mouse
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{editMouse}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to edit a mouse in the selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected mouse}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the edit button}
		\ucFlow{The application returns an edit form of the mouse}
		\ucFlow{\actor{Researcher} edits the information in the form and saves the mouse }
		\ucFlow{The application saves the changes made}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the mice details, OR
\item \actor{Researcher} exits while editing in the mouse form
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{removeMouse}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to remove a mouse in the selected colony due to death or unforeseen consequences}
	\ucStartEntry 
		\ucEntry{ \actor{Researcher} is viewing a selected mouse}
	\ucEndEntry
	\ucStartFlow 
		\ucFlow{\actor{Researcher} clicks on the edit button}
		\ucFlow{The application returns an edit form of the mouse}
		\ucFlow{\actor{Researcher} selects the removal button and confirms the selection}
		\ucFlow{The application removes the mouse}
	\ucEndFlow 
	\ucStartExit
\item The application removes the mouse from the mice in the list, OR  
\item \actor{Researcher} exits while confirming the removal
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\clearpage
\ucStart
	\ucName{viewColony}
	\ucStartActor
		\ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wishes to view a colony}
	\ucStartEntry
		\ucEntry{\actor{Researcher} is at the colonies view}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects a colony from the list of colonies}
		\ucFlow{The application returns details on the selected colony}
	\ucEndFlow
	\ucStartExit
		\item The application returns details on the selected colony
	\ucEndExit
	\ucStartQuality
		\item A response should be seen within a second or two
	\ucEndQuality
\ucEnd

\ucStart 
	\ucName{addColony}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wishes to create a new colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher}s selects the new colony button from the List of Colonies page}
		\ucFlow{The application returns a new colony screen}
		\ucFlow{\actor{Researcher} must enter a unique colony name}
		\ucFlow{\actor{Researcher} must enter at least one genotype}
		\ucFlow{\actor{Researcher} may select a default gender}
		\ucFlow{\actor{Researcher} may enter a default weaning time}
		\ucFlow{The application saves new colony}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the Colonies view
\item \actor{Researcher} cancels while creating a colony
	\ucEndExit 
	\ucStartQuality
\item System state update should take a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{modifyColony}
	\ucStartActor
		\ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} is at the colonies page and wishes to edit a colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects a colony from the List of Colonies page}
		\ucFlow{The application returns the selected colony page}
		\ucFlow{\actor{Researcher} selects the edit option from the Colony page}
		\ucFlow{The application returns a edit colony screen}
		\ucFlow{\actor{Researcher} may edit the name of the colony or change the genotypes or gender defaults and submits the form}
		\ucFlow{The application saves the changes to the colony}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the List of Colonies view
\item \actor{Researcher} cancels the edit
	\ucEndExit 
	\ucStartQuality
\item System state update should take a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{removeColony}
	\ucStartActor
		\ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} is at the List of Colonies page and wishes to remove a colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects a colony from the List Of Colonies page}
		\ucFlow{The application returns the selected Colony page}
		\ucFlow{\actor{Researcher} selects the edit option from the Colonies page}
		\ucFlow{The application returns a edit colony screen}
		\ucFlow{\actor{Researcher} selects the delete option}
		\ucFlow{The application removes the colony from the List of Colonies}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the List of Colonies view
\item Researcher cancels the deletion
	\ucEndExit 
	\ucStartQuality
\item System state update should take a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{importState}
	\ucStartActor
		\ucActor{Researcher}
		\ucActor{Operating System}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to import the data another researcher has done on a colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a specific colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the import/export button}
		\ucFlow{The application asks the researcher to confirm that they consent to having their information overwritten with the new colony information}
		\ucFlow{\actor{Researcher} confirms that they wish to proceed}
		\ucFlow{The application backs up the current colony state}
		\ucFlow{The application imports the new colony data and prompt researcher of it's completion}
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} cancels the process, OR
\item \actor{Researcher} is informed as to why the new colony data could not be updated
	\ucEndExit 
	\ucStartQuality
\item System state update should take around 10 seconds
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{exportState}

	\ucStartActor
		\ucActor{Researcher}
		\ucActor{Operating System}
	\ucEndActor
 
	\ucDescription{\actor{Researcher} wishes to export their information of a certain colony to a mailing client}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a certain colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the import/export button}
		\ucFlow{The application provides options to import and export}
		\ucFlow{\actor{Researcher} selects `email spreadsheet' function}
		\ucFlow{The application generates a colony state file in spreadsheet format}
		\ucFlow{The application notifies the Operating System that the researcher wishes to send an email with the file generated in the previous step attached, with a subject that contains a timestamp and other relevant information. Control is passed to the Operating System.}
	\ucEndFlow 
	\ucStartExit
\item Control successfully passed to Operating System, OR
\item \actor{Researcher} notified why control could not be successfully passed to Operating System
	\ucEndExit
	\ucStartQuality
\item Generating the file should take around 10 seconds
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{viewExperiments}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view a list of associated experiments from a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects a colony}
		\ucFlow{The application returns options for the selected colony }
		\ucFlow{\actor{Researcher} clicks on the list of Experiments}
		\ucFlow{The application returns a list of Experiments associated to the colony}
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} sees the experiments associated to the colony selected, OR
\item The application informs the researcher that there are no experiments associated with the colony
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{viewExperiment}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to view an experiment from a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
%From Colony view:
		\ucFlow{\actor{Researcher} clicks on the list of experiments}
		\ucFlow{The application returns a list of Experiments associated to the colony}
		\ucFlow{\actor{Researcher} clicks one of the experiments}
		\ucFlow{The application returns the details of the experiment }
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} can now see the details of the experiment selected, OR
\item The application allows options to configure the pair
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{addExperiment}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to add an experiment to a selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected colony}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the list of experiments}
		\ucFlow{The application returns a list of experiments}
		\ucFlow{\actor{Researcher} clicks on the add an experiment button}
		\ucFlow{The application returns an empty experiment form }
		\ucFlow{\actor{Researcher} must enter a unique experiment name}
		\ucFlow{\actor{Researcher} must select an experiment priority}
		\ucFlow{\actor{Researcher} must enter at least one experiment duration}
		\ucFlow{The application saves the changes made}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the list of experiments, OR
\item \actor{Researcher} exits without saving while filling in the experiment form
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{editExperiment}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to edit an experiment in the selected colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected experiment}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the edit button}
		\ucFlow{The application returns an edit form of the experiment}
		\ucFlow{\actor{Researcher} edits the information in the form and saves the experiment  }
		\ucFlow{The application saves the changes made}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the experiment details, OR
\item \actor{Researcher} exits while editing in the experiment form
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{removeExperiment}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to remove an experiment from the colony}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is viewing a selected experiment}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} clicks on the edit button}
		\ucFlow{The application returns an edit form of the experiment}
		\ucFlow{\actor{Researcher} selects the remove button and confirms the selection}
		\ucFlow{The application removes the experiment}
	\ucEndFlow 
	\ucStartExit
\item The application removes the pair from the experiment list, OR
\item \actor{Researcher} exits while deleting the experiment
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{viewTeamMembers}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to see the a list of team members who can receive data updates}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects the edit button}
		\ucFlow{The application returns options}
		\ucFlow{\actor{Researcher} clicks on the team members options}
		\ucFlow{The application returns a list of team members}
	\ucEndFlow 
	\ucStartExit
\item \actor{Researcher} sees the team members in the mailing list, OR
\item The application informs the researcher that there are no team members in his list
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{addTeamMember}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to add a team member to the a list of team members}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects the edit button}
		\ucFlow{The application returns options}
		\ucFlow{\actor{Researcher} clicks on the team member options}
		\ucFlow{The application returns a list of team members}
		\ucFlow{\actor{Researcher} click on the add button}
		\ucFlow{The application returns an empty mailing form for the researcher}
		\ucFlow{\actor{Researcher} must enter a unique team member name}
		\ucFlow{\actor{Researcher} must enter an email address}
		\ucFlow{The application saves the information}
	\ucEndFlow 
	\ucStartExit
\item The application returns to the team member list, OR
\item \actor{Researcher} exits while editing in the team member form
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd

\ucStart 
	\ucName{deleteTeamMember}
	\ucStartActor
		 \ucActor{Researcher}
	\ucEndActor
	\ucDescription{\actor{Researcher} wants to delete a team member from the a list of team members}
	\ucStartEntry 
		\ucEntry{\actor{Researcher} is at the colonies view screen}
	\ucEndEntry
	\ucStartFlow
		\ucFlow{\actor{Researcher} selects the edit button}
		\ucFlow{The application returns options}
		\ucFlow{\actor{Researcher} clicks on the team member options}
		\ucFlow{The application returns a list of team members}
		\ucFlow{\actor{Researcher} click on the minus symbol by a team member's name}
		\ucFlow{The application removes that team member}
	\ucEndFlow 
	\ucStartExit
\item The application stays on the team member list
	\ucEndExit 
	\ucStartQuality
\item A response should be seen within a second or two
	\ucEndQuality 
\ucEnd


\clearpage
\subsubsection{Object models}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{addColonySD}
\caption{Add Colony sequence diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{disableBreedingPairSD}
\caption{Disable BreedingPair sequence diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{editMouseSD}
\caption{Edit Mouse sequence diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{removeTeamMemberSD}
\caption{Remove TeamMember sequence diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[width=\textwidth]{viewExperimentSD}
\caption{View Experiment sequence diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{BoundaryCD}
\caption{Boundary class diagram}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{ControlCD}
\caption{Control class diagram}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{EntityCD}
\caption{Entity class diagram}
\end{figure}

\clearpage
\subsubsection{Dynamic models}

\begin{figure}[htb]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{ListViewSM}
\caption{ListView boundary object state machine}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{DetailViewSM}
\caption{DetailView boundary object state machine}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{MouseSM}
\caption{Mouse entity object state machine}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{BreedingPairSM}
\caption{BreedingPair entity object state machine}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[keepaspectratio,height=0.7\textheight,width=\textwidth]{ExperimentSM}
\caption{Experiment entity object state machine}
\end{figure}

\clearpage
\subsubsection{User interface}

\begin{figure}[htb]
\centering
\includegraphics[scale=0.75]{colony_page}
\caption{Colony page}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[scale=0.75]{colonyview}
\caption{Colony view}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[scale=0.75]{colonyeditlist}
\caption{Colony edit list}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[scale=0.75]{colonyeditpage}
\caption{Colony edit page}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[scale=0.75]{colonyeditlistconfirm}
\caption{Colony edit list confirm}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[scale=0.75]{experimentcreate}
\caption{Experiment create}
\end{figure}

\begin{figure}[htb]
\centering
\includegraphics[scale=0.75]{litterdata}
\caption{Litter data}
\end{figure}

\clearpage
\section{Glossary}

\begin{description}
\item[BBOS ---] BlackBerry Operating System, the operating system present on modern BlackBerry Phones.
\item[Breeding Pair ---] A pair of mice designated for breeding purposes. Kept aside from the rest of the colony.
\item[Colony ---] A colony is a group of mice which will be monitored and used to breed mice fitting desired criteria for experimental use.
\item[Control Group ---] Control groups are used by experiments in order to obtain the desired mix of mice traits. An example of this would be an experiment needing a group of ten females, and another group of 8 males.
\item[Database ---] Collects and retains data used for [Application] and remains inside the phone until the deletion of the application. 
\item[DOB ---] Date of Birth.
\item[Duration ---] An amount of time after the researcher has started a mouse in the experiment before they have to check up on them at the finish.
\item[Experiment ---] A test or series thereof which the researchers would like to accomplish using the mice in their colony.
\item[Genotype ---] A classification of the mice used in creating control groups for experiments, mice genotypes are obtained by sending samples to a test lab.
\item[iOS ---] Apple's iPhone, iPad, and iPod operating system.
\item[Litter ---] A group of pups from a single birth. 
\item[PhoneGap ---] A cross platform mobile development framework which allows developers to program in web languages and renders them into the native language of the device.
\item[Pup ---] A newborn mouse.
\item[Researcher ---] The person maintaining the colony and performing experiments.
\item[Research Lab ---] The location where the colonies are kept, and work with the mice is performed.
\item[Test Lab ---] Refers to to the location mice samples are sent for genotype analysis, or the room in which the colonies are kept.
\end{description}

\end{document}
